package com.ucode.model.cgms.form;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema.RequiredMode;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "陪玩俱乐部社区系统 - 陪玩线下订单报备Form")
@Data
@EqualsAndHashCode
public class CgmsCompanionOfflineOrderReportForm {

    @Schema(description = "主键ID（更新时必填）")
    private Long id;

    @Schema(description = "商品ID", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "商品ID不能为空")
    private Long productId;

    @Schema(description = "商品标题", requiredMode = RequiredMode.REQUIRED)
    @NotBlank(message = "商品标题不能为空")
    @Size(max = 255, message = "商品标题不能超过255个字符")
    private String title;

    @Schema(description = "商品子标题")
    @Size(max = 255, message = "商品子标题不能超过255个字符")
    private String subTitle;

    @Schema(description = "商品列表图")
    @Size(max = 255, message = "商品列表图URL不能超过255个字符")
    private String picUrl;

    @Schema(description = "市场价,单位:元", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "市场价不能为空")
    private BigDecimal marketPrice;

    @Schema(description = "现价,单位:元", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "现价不能为空")
    private BigDecimal price;

    @Schema(description = "商品抽成配置 1-固定金额 2-按比例")
    private Integer commissionMode;

    @Schema(description = "商品抽成配置模式对应配置参数值")
    private BigDecimal commissionPrice;

    @Schema(description = "商品返点配置 1-固定金额 2-按比例")
    private Integer rebateMode;

    @Schema(description = "商品返点配置模式对应配置参数值")
    private BigDecimal rebatePrice;

    @Schema(description = "数量", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "数量不能为空")
    private Integer quantity;

    @Schema(description = "最终付款金额,单位:元", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "最终付款金额不能为空")
    private BigDecimal payPrice;

    @Schema(description = "预约人名称", requiredMode = RequiredMode.REQUIRED)
    @NotBlank(message = "预约人名称不能为空")
    @Size(max = 50, message = "预约人名称不能超过50个字符")
    private String scheduledName;

    @Schema(description = "预约联系方式", requiredMode = RequiredMode.REQUIRED)
    @NotBlank(message = "预约联系方式不能为空")
    @Size(max = 50, message = "预约联系方式不能超过50个字符")
    private String scheduledContact;

    @Schema(description = "服务开始时间", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "服务开始时间不能为空")
    private LocalDateTime serviceStartTime;

    @Schema(description = "服务结束时间", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "服务结束时间不能为空")
    private LocalDateTime serviceEndTime;

    @Schema(description = "服务人员ID", requiredMode = RequiredMode.REQUIRED)
    @NotNull(message = "服务人员ID不能为空")
    private Long serviceUserId;

    @Schema(description = "服务取证图片", requiredMode = RequiredMode.AUTO)
    @Size(max = 9, message = "服务取证图片不能超过9张")
    private List<String> evidencePics;

    @Schema(description = "服务取证备注", requiredMode = RequiredMode.REQUIRED)
    @NotBlank(message = "服务取证备注不能为空")
    @Size(max = 500, message = "服务取证备注不能超过500个字符")
    private String evidenceRemark;
} 